package com.codeforces.contest.c298;
import java.util.Scanner;


public class _298B {

	static Scanner scanner = new Scanner(System.in);
	static int t, sx, sy, ex, ey, dn, ds, de, dw;
	static String s;

	public static void main(String[] args) {
		t = scanner.nextInt();
		sx = scanner.nextInt();
		sy = scanner.nextInt();
		ex = scanner.nextInt();
		ey = scanner.nextInt();
		s = scanner.next();
		if (sx < ex) {
			de = ex - sx;
			dw = 0;
		}
		else {
			dw = sx - ex;
			de = 0;
		}
		if (sy < ey) {
			dn = ey - sy;
			ds = 0;
		}
		else {
			ds = sy - ey;
			dn = 0;
		}
		for (int i=0;i<t;++i) {
			char c = s.charAt(i);
			switch (c) {
			case 'E':
				if (de > 0) {
					de--;
				}
				break;
			case 'W':
				if (dw > 0) {
					dw--;
				}
				break;
			case 'S':
				if (ds > 0) {
					ds--;
				}
				break;
			case 'N':
				if (dn > 0) {
					dn--;
				}
				break;
			}
			if (ds == 0 && de == 0 && dw == 0 && dn == 0) {
				System.out.println(i+1);
				return;
			}
		}
		System.out.println(-1);
	}

}
